home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 June: Reference Library / Dev.CD Jun 99 RL Disk 1.toast / Technical Documentation / Develop / develop Issue 28 / develop Issue 28 code / MacApp Debugging / TwistDownLists / Twist Down Lists.r < prev    next >
Encoding:
Text File  |  1996-10-04  |  20.0 KB  |  754 lines  |  [TEXT/MPS ]

  1. //--------------------------------------------------------------------------------------------------                                                                        
  2. // Twist Down Lists.r
  3. // ETO20 MacApp 3.3.1, MPW 3.4.1
  4. // Copyright © 1994-1996 by Conrad Kopala
  5. // Twist Down Lists version 2.0a0 7/15/96
  6. //--------------------------------------------------------------------------------------------------
  7.  
  8. //--------------------------------------------------------------------------------------------------
  9. // INCLUDE FILES 
  10. //--------------------------------------------------------------------------------------------------
  11.  
  12. // Standard Includes 
  13.  
  14. #ifndef __TYPES_R__
  15. #include "Types.r"
  16. #endif
  17.  
  18. #ifndef __SYSTYPES_R__
  19. #include "SysTypes.r"
  20. #endif
  21.  
  22. #ifndef __BalloonTypes__
  23. #include "BalloonTypes.r"
  24. #endif
  25.  
  26. #ifndef __MacAppTypes__
  27. #include "MacAppTypes.r"
  28. #endif
  29.  
  30. #ifndef __ViewTypes__
  31. #include "ViewTypes.r"
  32. #endif
  33.  
  34. #ifndef __MACAPPVERSION__
  35. #include "MacAppVersion.h"
  36. #endif
  37.  
  38. #ifndef __TDLCOPYRIGHT__
  39. #include "TDLCopyright.h"
  40. #endif
  41.  
  42.  
  43. #if qDebug | qPerform
  44. include "Debug.rsrc" not 'ckid';
  45. #endif
  46.  
  47. include "Dialog.rsrc" not 'ckid';
  48. include "MacApp.rsrc" not 'ckid';
  49.  
  50. // Includes for Building Blocks
  51.  
  52. include "Printing.rsrc" not 'ckid';
  53.  
  54. #include "TwistDownGlobals.r"
  55. #include "TDLErrors.r"
  56. #include "ProgressIndicators.r"
  57. #include "BalloonHelp.r"
  58.  
  59. // Include Code Resources
  60.  
  61. #if !qPowerPC
  62. include $$Shell("ObjApp")$$Shell("XAppName") 'CODE';
  63. #endif
  64.  
  65. //--------------------------------------------------------------------------------------------------
  66. // CONSTANTS 
  67. //--------------------------------------------------------------------------------------------------
  68.  
  69. // Finder Information
  70. // ------------------
  71.  
  72. #define kApplicationName    $$Shell("XAppName")
  73.  
  74. // Bundle Constants
  75. // ------------------
  76. #define kBundleID                        128
  77. #define kApplicationID            128
  78. #define kDocumentID                    129
  79.  
  80. // Memory Management Resources
  81. // ---------------------------
  82. #define kTwistDownAppSeg    1000
  83. #define kTwistDownAppMem    1000
  84. #define kTwistDownAppRes    1000
  85.  
  86. //--------------------------------------------------------------------------------------------------
  87. // AppleEvent dispatch table
  88. //--------------------------------------------------------------------------------------------------
  89. resource 'aedt' (kTDLAEDispatchTable) {
  90.     {
  91.     kAETwistDownListsSuite, kAEExpandAllID,                                cExpandAll;            //Event Class, Event ID, Value
  92.     kAETwistDownListsSuite, kAECollapseAllID,                            cCollapseAll;
  93.     kAETwistDownListsSuite, kAEExpandElementID,                        cExpandElement;            
  94.     kAETwistDownListsSuite, kAECollapseElementID,                    cCollapseElement;    
  95.  
  96. #if qDebug
  97.     kAETwistDownListsSuite, kAEResetObjectCountID,                cResetObjectCount;
  98. #endif
  99.     }
  100. };
  101. //--------------------------------------------------------------------------------------------------
  102. // Menu Bars 
  103. //--------------------------------------------------------------------------------------------------
  104. resource 'MBAR' (kMBarDisplayed,
  105. #if qNames
  106. kApplicationName,
  107. #endif
  108.     nonpurgeable) {
  109.     { mApple; mFile; mEdit; mFormatMenu; mControlMenu; mWindowsMenu
  110.     
  111.     #if qDebug
  112.     ;
  113.     mTestMenu;
  114.     #endif
  115.     
  116.      }
  117. };
  118.  
  119. resource 'MBAR' (kMBarHierarchical,
  120. #if qNames
  121. "kMBarHierarchical",
  122. #endif
  123. nonpurgeable) {
  124.     {mFontMenu
  125.  
  126.     } 
  127. };
  128.  
  129. //--------------------------------------------------------------------------------------------------
  130. // Menus 
  131. //--------------------------------------------------------------------------------------------------
  132. include "Defaults.rsrc" 'CMNU' (mApple);    // Grab the default Apple menus
  133. include "Defaults.rsrc" 'CMNU' (mFile);        // Grab the default File menus
  134. include "Defaults.rsrc" 'CMNU' (mEdit);        // Grab the default Edit menu
  135.  
  136. resource 'CMNU' (mFormatMenu,
  137. #if qNames
  138. "Format Menu",
  139. #endif
  140. nonpurgeable) {
  141.     mFormatMenu,
  142.     textMenuProc,
  143.     EnablingManagedByMacApp,
  144.     enabled,
  145.     "Format",
  146.      {
  147. /* [ 1] */    "Use System Direction",    noIcon,    noKey,    noMark,    plain, cUseSystemDirection;
  148. /* [ 2] */    "Right to Left",                noIcon,    noKey,    noMark,    plain, cWritingDirection; //this is toggled
  149. /* [ 3] */    "-",                                        noIcon, noKey,    noMark, plain, nocommand;
  150. /* [ 4] */    " 9 Point",                            noIcon,    noKey,    noMark,    plain,    cFontSizeBase+9;
  151. /* [ 5] */    "10 Point",                            noIcon,    noKey,    noMark,    plain,    cFontSizeBase+10;
  152. /* [ 6] */    "12 Point",                            noIcon,    noKey,    noMark,    plain,    cFontSizeBase+12;
  153. /* [ 7] */    "14 Point",                            noIcon,    noKey,    noMark,    plain,    cFontSizeBase+14;
  154. /* [ 8] */    "18 Point",                            noIcon,    noKey,    noMark,    plain,    cFontSizeBase+18;
  155. /* [ 9] */    "24 Point",                            noIcon,    noKey,    noMark,    plain,    cFontSizeBase+24;
  156. /* [10] */    "-",                                        noIcon,    noKey,    noMark,    plain,    nocommand;
  157. /* [11] */    "Larger",                                noIcon,    "]",        noMark,    plain,    cLargerFontSize;
  158. /* [12] */    "Smaller",                            noIcon,    "[",        noMark,    plain,    cSmallerFontSize;
  159. /* [13] */    "-",                                        noIcon,    noKey,    noMark,    plain,    nocommand;
  160. /* [14] */    "Other…",                                noIcon,    noKey,    noMark,    plain,    cOtherFontSize;
  161. /* [15] */    "-",                                        noIcon,    noKey,    noMark,    plain,    nocommand;
  162. /* [16] */    "Font",                                    noIcon, kHierarchicalMenu, hmFontMenu, plain, cFont
  163.      }
  164.     };
  165.  
  166. resource 'CMNU' (mControlMenu,
  167. #if qNames
  168. "Control",
  169. #endif
  170. nonpurgeable) {
  171.     mControlMenu,
  172.     textMenuProc,
  173.     EnablingManagedByMacApp,
  174.     enabled,
  175.     "Control",
  176.      {
  177. /* [ 1] */    "FailHere",                            noIcon,    noKey,    noMark, plain, cFailHere;
  178. /* [ 2] */    "Show All Files",                noIcon, noKey,    noMark, plain, cShowInvisibleFiles;
  179. /* [ 3] */    "-",                                        noIcon, noKey,    noMark, plain, nocommand;
  180. /* [ 4] */    "Expand All",                        noIcon, noKey,    noMark, plain, cExpandAll;
  181. /* [ 5] */    "Collapse All",                    noIcon, noKey,    noMark, plain, cCollapseAll;
  182. /* [ 6] */    "-",                                        noIcon, noKey,    noMark, plain, nocommand;
  183. /* [ 7] */    "Send Apple Events",        noIcon,    noKey,    noMark, plain, cSendAppleEvents;
  184. /* [ 8] */    "Send To Doc",                    noIcon,    noKey,    noMark,    plain, cAppleEventRouting; //this is toggled
  185. /* [ 9] */    "-",                                        noIcon, noKey,    noMark, plain, nocommand;
  186. /* [10] */    "Allow Unlimited Docs",    noIcon,    noKey,    noMark, plain, cAllowUnlimitedDocs
  187.      }
  188.     };
  189.  
  190.  
  191. resource 'CMNU' (mWindowsMenu,
  192. #if qNames
  193. "Windows Menu",
  194. #endif
  195. nonpurgeable) {
  196.     mWindowsMenu,
  197.     textMenuProc,
  198.     EnablingManagedByMacApp,
  199.     enabled,
  200.     "Windows",
  201.      {
  202.  
  203.      }
  204.     };
  205.  
  206.  
  207. //I should probably append or otherwise incorporate the mTestMenu items in the MacApp
  208. //provided Debug menu. I'll do that when I encounter a menu bar real estate problem.
  209. #if qDebug                    
  210. resource 'CMNU' (mTestMenu,
  211. #if qNames
  212. "Test",
  213. #endif
  214. nonpurgeable) {
  215.     mTestMenu,
  216.     textMenuProc,
  217.     EnablingManagedByMacApp,
  218.     enabled,
  219.     "Test",
  220.      {
  221. /* [ 1] */    "AppUserFlag1",                            noIcon,    noKey,    noMark, plain, cAppUserFlag1;
  222. /* [ 2] */    "AppUserFlag2",                            noIcon,    noKey,    noMark, plain, cAppUserFlag2;
  223. /* [ 3] */    "AppUserFlag3",                            noIcon,    noKey,    noMark, plain, cAppUserFlag3;
  224. /* [ 4] */    "-",                                                noIcon, noKey,    noMark, plain, nocommand;
  225. /* [ 5] */    "Count Objects",                        noIcon,    noKey,    noMark, plain, cCountObjects;
  226. /* [ 6] */    "Reset Object Count",                noIcon,    noKey,    noMark, plain, cResetObjectCount;
  227. /* [ 7] */    "-",                                                noIcon, noKey,    noMark, plain, nocommand;
  228. /* [ 8] */    "Print Base Class Info",        noIcon,    noKey,    noMark, plain, cPrintBaseClassInfo;
  229. /* [ 9] */    "Print MacApp Class Info",    noIcon,    noKey,    noMark, plain, cPrintMacAppClassInfo;
  230. /* [10] */    "Print App Class Info",            noIcon,    noKey,    noMark, plain, cPrintAppClassInfo
  231.  
  232.     };
  233. };
  234. #endif
  235.  
  236.  
  237. resource 'CMNU' (mFontMenu,
  238. #if qNames
  239. "FontMenu",
  240. #endif
  241. nonpurgeable
  242. ) {
  243.     mFontMenu,
  244.     textMenuProc,
  245.     allEnabled,
  246.     enabled,
  247.     "Fonts",
  248.     { }
  249. };
  250.  
  251. //--------------------------------------------------------------------------------------------------
  252. // Balloon Help Resources for Menus 
  253. //--------------------------------------------------------------------------------------------------
  254.  
  255. include "Defaults.rsrc"  'hmnu' (mApple);    
  256.  
  257. //--------------------------------------------------------------------------------------------------
  258. // RESOURCES FOR VIEWS, DIALOGS, ALERTS etc. 
  259. //--------------------------------------------------------------------------------------------------
  260.  
  261.  
  262. //--------------------------------------------------------------------------------------------------
  263. // Views 
  264. //--------------------------------------------------------------------------------------------------
  265.  
  266. resource 'STR#' (kTwistDownTitles,
  267. #if qNames
  268. "Window titles",
  269. #endif
  270. nonpurgeable) {
  271.     {
  272. /* [1] */    "",
  273. /* [2] */    "Font Size Change",
  274. /* [3] */    "Font Size:",
  275. /* [4] */    "OK",
  276. /* [5] */    "Cancel",
  277. /* [6] */    "Stop",
  278. /* [7] */    "Reading:",
  279. /* [8] */    "Untitled",
  280.     }
  281. };
  282.  
  283. resource 'View' (kTwistDownWindowID, 
  284. #if qNames
  285. "TwistDownWindow",
  286. #endif 
  287. nonpurgeable) {MAThreeOh,
  288.     {    /* array ViewArray: 5 elements */
  289.         /* [1] */
  290.         ViewSignatureAndClassname {
  291.             'wind',600,"",noID,enabled,noIdle,{},MAThreeOh,
  292.             {76,179},{238,239},sizeVariable,sizeVariable,shown,doesntWantToBeTarget,
  293.             handlesCursor,letsSubViewsHandleCursor,noCursorID,
  294.             handlesHelp,letsSubViewsHandleHelp,noHelpID,1,
  295.             NoDrawingEnvironment {},
  296.             AdornerListSignatureAndClassname {
  297.                 NoIdentifier,AdornerList,AdornerElementSize,AdornerElementSizeShift,
  298.                 DynamicArrayAllocationIncrement,
  299.                 {
  300.                     AdornFirst,AdornerLocalObject {EraseAdorner},
  301.                     DrawView,AdornerLocalObject {DrawAdorner},
  302.                     AdornLast,AdornerLocalObject {ResizeIconAdorner}
  303.                 }
  304.             },
  305.             emptyUserArea,
  306.             Window {
  307.                 zoomDocProc,kTwistDownViewID,goAwayBox,resizable,ignoreFirstClick,
  308.                 freeOnClosing,disposeOnFree,closesDocument,openWithDocument,
  309.                 dontAdaptToScreen,stagger,forceOnScreen,center,
  310.                 doesntFloat,doesntHideOnSuspend,generateActivates,filler,kTwistDownTitles,1
  311.             },
  312.             3
  313.         },
  314.         /* [2] */
  315.         ViewSignatureAndClassname {
  316.             'scrl',252,"",'SCLR',enabled,noIdle,{},MAThreeOh,
  317.             {0,0},{223,224},sizeRelSuperView,sizeRelSuperView,shown,doesntWantToBeTarget,
  318.             handlesCursor,letsSubViewsHandleCursor,noCursorID,
  319.             handlesHelp,letsSubViewsHandleHelp,noHelpID,1,
  320.             NoDrawingEnvironment {},
  321.             NoAdorners {},
  322.             emptyUserArea,
  323.             Scroller {
  324.                 'vCLR','hCLR',{501,502},{16,16},VertConstrain,HorzConstrain,
  325.                 {0,0,0,0},respondsToFKeys
  326.             },
  327.             1
  328.         },
  329.         /* [3] */
  330.         ViewSignatureAndClassname {
  331.             'lstg',141,"TTwistDownView",kTwistDownViewID,enabled,noIdle,{},MAThreeOh,
  332.             {0,0},{223,224},sizeVariable,sizeVariable,shown,doesntWantToBeTarget,
  333.             handlesCursor,letsSubViewsHandleCursor,noCursorID,
  334.             handlesHelp,letsSubViewsHandleHelp,noHelpID,1,
  335.             NoDrawingEnvironment {},
  336.             AdornerListSignatureAndClassname {
  337.                 NoIdentifier,AdornerList,AdornerElementSize,AdornerElementSizeShift,
  338.                 DynamicArrayAllocationIncrement,
  339.                 {
  340.                     DrawView,AdornerLocalObject {DrawAdorner},
  341.                     72,AdornerLocalObject {SelectionAdorner}
  342.                 }
  343.             },
  344.             emptyUserArea,
  345.             TextListView {
  346.                 0,1,0,1000,2,2,dontAdornRows,dontAdornCols,singleSelection,kApplFont12TextStyle,dontPreferOutline
  347.             },
  348.             NoSubviews
  349.         },
  350.         /* [4] */
  351.         ViewSignatureAndClassname {
  352.             'ssbr',101,"",'hCLR',enabled,noIdle,{},MAThreeOh,
  353.             {223,-1},{16,226},sizeVariable,sizeVariable,shown,doesntWantToBeTarget,
  354.             handlesCursor,letsSubViewsHandleCursor,noCursorID,
  355.             handlesHelp,letsSubViewsHandleHelp,noHelpID,1,
  356.             NoDrawingEnvironment {},
  357.             NoAdorners {},
  358.             emptyUserArea,
  359.             ScrollerScrollBar {
  360.                 mHScrollBarHit,notHilited,notDimmed,sizeable,{0,0,0,0},
  361.                 kSystemFontTextStyle,dontPreferOutline,h,0,0,278
  362.             },
  363.             NoSubviews
  364.         },
  365.         /* [5] */
  366.         ViewSignatureAndClassname {
  367.             'ssbr',101,"",'vCLR',enabled,noIdle,{},MAThreeOh,
  368.             {-1,224},{225,16},sizeVariable,sizeVariable,shown,doesntWantToBeTarget,
  369.             handlesCursor,letsSubViewsHandleCursor,noCursorID,
  370.             handlesHelp,letsSubViewsHandleHelp,noHelpID,1,
  371.             NoDrawingEnvironment {},
  372.             NoAdorners {},
  373.             emptyUserArea,
  374.             ScrollerScrollBar {
  375.                 mVScrollBarHit,notHilited,notDimmed,sizeable,{0,0,0,0},
  376.                 kSystemFontTextStyle,dontPreferOutline,v,0,0,278
  377.             },
  378.             NoSubviews
  379.         }
  380.     }
  381. };
  382.  
  383.  
  384. resource 'View' (kChangeFontSizeWindowID, 
  385. #if qNames
  386. "ChangeFontSizeDialog", 
  387. #endif 
  388. nonpurgeable) {
  389.     MAThreeOh,
  390.     {    /* array ViewArray: 6 elements */
  391.         /* [1] */
  392.         ViewSignatureAndClassname {
  393.             'wind',840,"",noID,enabled,noIdle,
  394.             {
  395.                 BehaviorSignatureAndClassname {
  396.                     noID,"TDialogBehavior",DialogBehavior {enabled,noIdle,modal,kDefaultOKItemID,kCancelItemID}
  397.                 }
  398.             },
  399.             MAThreeOh,
  400.             {239,223},{100,200},sizeVariable,sizeVariable,shown,doesntWantToBeTarget,
  401.             handlesCursor,letsSubViewsHandleCursor,noCursorID,
  402.             handlesHelp,letsSubViewsHandleHelp,noHelpID,1,
  403.             NoDrawingEnvironment {},
  404.             AdornerListSignatureAndClassname {
  405.                 NoIdentifier,AdornerList,AdornerElementSize,AdornerElementSizeShift,
  406.                 DynamicArrayAllocationIncrement,
  407.                 {
  408.                     AdornFirst,AdornerLocalObject {EraseAdorner},
  409.                     DrawView,AdornerLocalObject {DrawAdorner}
  410.                 }
  411.             },
  412.             emptyUserArea,
  413.             Window {
  414.                 movableDBoxProc,kChangeFontSizeViewID,noGoAwayBox,notResizable,ignoreFirstClick,
  415.                 freeOnClosing,disposeOnFree,doesntCloseDocument,dontOpenWithDocument,
  416.                 dontAdaptToScreen,dontStagger,forceOnScreen,center,doesntFloat,
  417.                 doesntHideOnSuspend,generateActivates,filler,kTwistDownTitles,2
  418.             },
  419.             1
  420.         },
  421.         /* [2] */
  422.         ViewSignatureAndClassname {
  423.             'view',669,"TChangeFontSizeDialog",kChangeFontSizeViewID,notEnabled,noIdle,{},MAThreeOh,
  424.             {0,0},{100,200},sizeFixed,sizeFixed,shown,doesntWantToBeTarget,
  425.             handlesCursor,letsSubViewsHandleCursor,noCursorID,
  426.             handlesHelp,letsSubViewsHandleHelp,noHelpID,1,
  427.             NoDrawingEnvironment {},
  428.             NoAdorners {},
  429.             emptyUserArea,
  430.             View {},
  431.             4
  432.         },
  433.         /* [3] */
  434.         ViewSignatureAndClassname {
  435.             'stat',96,"",noID,notEnabled,noIdle,{},MAThreeOh,
  436.             {17,9},{22,73},sizeFixed,sizeFixed,shown,doesntWantToBeTarget,
  437.             handlesCursor,letsSubViewsHandleCursor,noCursorID,
  438.             handlesHelp,letsSubViewsHandleHelp,noHelpID,1,
  439.             NoDrawingEnvironment {},
  440.             NoAdorners {},
  441.             emptyUserArea,
  442.             StaticText {
  443.                 mStaticTextHit,notHilited,notDimmed,notSizeable,{0,0,0,0},
  444.                 kSystemFontTextStyle,dontPreferOutline,autoWrap,dontEraseFirst,justSystem,kTwistDownTitles,3
  445.             },
  446.             NoSubviews
  447.         },
  448.         /* [4] */
  449.         ViewSignatureAndClassname {
  450.             'butn',203,"",kDefaultOKItemID,enabled,noIdle,{},MAThreeOh,
  451.             {51,97},{28,72},sizeFixed,sizeFixed,shown,doesntWantToBeTarget,
  452.             handlesCursor,letsSubViewsHandleCursor,noCursorID,
  453.             handlesHelp,letsSubViewsHandleHelp,kChangeFontSizeDialogHelp,2,
  454.             DrawingEnvironmentClassIDAndClassname {
  455.                 1,"TDrawingEnvironment",{3,3},8,$"FFFF FFFF FFFF FFFF",{0,0,0},{65535,65535,65535}
  456.             },
  457.             AdornerListSignatureAndClassname {
  458.                 NoIdentifier,AdornerList,AdornerElementSize,
  459.                 AdornerElementSizeShift,
  460.                 DynamicArrayAllocationIncrement,
  461.                 {
  462.                     DrawView,AdornerLocalObject {DrawAdorner},
  463.                     AdornAfter,AdornerSignatureAndClassname {'rrct',"",'outl',freeOnDeletion,$""}
  464.                 }
  465.             },
  466.             emptyUserArea,
  467.             Button {
  468.                 mDismiss,notHilited,notDimmed,notSizeable,{4,4,4,4},
  469.                 kSystemFontTextStyle,dontPreferOutline,kTwistDownTitles,4
  470.             },
  471.             NoSubviews
  472.         },
  473.         /* [5] */
  474.         ViewSignatureAndClassname {
  475.             'butn',92,"",kCancelItemID,enabled,noIdle,{},MAThreeOh,
  476.             {55,9},{20,64},sizeFixed,sizeFixed,shown,doesntWantToBeTarget,
  477.             handlesCursor,letsSubViewsHandleCursor,noCursorID,
  478.             handlesHelp,letsSubViewsHandleHelp,kChangeFontSizeDialogHelp,3,
  479.             NoDrawingEnvironment {},
  480.             NoAdorners {},
  481.             emptyUserArea,
  482.             Button {
  483.                 mDismiss,notHilited,notDimmed,notSizeable,{0,0,0,0},
  484.                 kSystemFontTextStyle,dontPreferOutline,kTwistDownTitles,5
  485.             },
  486.             NoSubviews
  487.         },
  488.         /* [6] */
  489.         ViewSignatureAndClassname {
  490.             'nmbr',171,"",kSizeValueViewID,enabled,noIdle,{},MAThreeOh,
  491.             {17,97},{22,36},sizeFixed,sizeFixed,shown,wantsToBeTarget,
  492.             handlesCursor,doesntLetSubViewsHandleCursor,1,
  493.             handlesHelp,letsSubViewsHandleHelp,kChangeFontSizeDialogHelp,1,
  494.             NoDrawingEnvironment {},
  495.             AdornerListSignatureAndClassname {
  496.                 NoIdentifier,AdornerList,AdornerElementSize,AdornerElementSizeShift,
  497.                 DynamicArrayAllocationIncrement,
  498.                 {
  499.                     DrawView,AdornerLocalObject {DrawAdorner},
  500.                     AdornAfter,AdornerSignatureAndClassname {'fram',"",NoIdentifier,freeOnDeletion,$""}
  501.                 }
  502.             },
  503.             emptyUserArea,
  504.             NumberText {
  505.                 mEditTextHit,notHilited,notDimmed,notSizeable,{3,3,3,3},
  506.                 kSystemFontTextStyle,dontPreferOutline,autoWrap,dontEraseFirst,
  507.                 justSystem,-1,-1,4,LeftRightUpDownBackspace,0,9,48
  508.             },
  509.             NoSubviews
  510.         }
  511.     }
  512. };
  513.  
  514.  
  515.  
  516. //--------------------------------------------------------------------------------------------------
  517. // MultiFinder™ information
  518. //--------------------------------------------------------------------------------------------------
  519.  
  520. #if qNames
  521. #define kNamesSizeDelta 75
  522. #else
  523. #define kNamesSizeDelta 0
  524. #endif
  525.  
  526. #if qDebug
  527. #define kDebugSizeDelta 250
  528. #else
  529. #define kDebugSizeDelta 0
  530. #endif
  531.  
  532. #if qModelFarCode
  533. #define kModelFarSizeDelta 0
  534. #else
  535. #define kModelFarSizeDelta 0
  536. #endif
  537.  
  538.  
  539. resource 'SIZE' (-1) {
  540.     saveScreen,
  541.     acceptSuspendResumeEvents,
  542.     enableOptionSwitch,
  543.     canBackground,
  544.     doesActivateOnFGSwitch,
  545.     backgroundAndForeground,
  546.     dontGetFrontClicks,
  547.     ignoreAppDiedEvents,
  548.     is32BitCompatible,
  549.     isHighLevelEventAware,
  550.     localAndRemoteHLEvents,
  551.     notStationeryAware,                
  552.     reserved,
  553.     reserved,
  554.     reserved,
  555.     reserved,
  556.     
  557.     /* Suggested partition size */
  558.     (1700 + kNamesSizeDelta + kDebugSizeDelta + kModelFarSizeDelta) * 1024,
  559.     
  560.     /* Minimum partition size */
  561.     (1200 + kNamesSizeDelta + kDebugSizeDelta + kModelFarSizeDelta) * 1024
  562. };
  563.  
  564. //--------------------------------------------------------------------------------------------------
  565. // Memory usage information for Twist Down Lists
  566. //--------------------------------------------------------------------------------------------------
  567.  
  568. // See Memory.r
  569. resource 'mem!' (132,
  570. #if qNames
  571.     kApplicationName,
  572. #endif
  573.     purgeable) {
  574.     0,        // Add to object heap size
  575.     2*1024,        // Add to heap increment size
  576.     26*1024,        // Add to temporary reserve
  577.     36*1024,        // Add to permanent reserve
  578.     32 *1024        // Add to stack space
  579. };
  580.  
  581. #if !qPowerPC
  582. resource 'seg!' (kTwistDownAppSeg,
  583. #if qNames
  584. kApplicationName,
  585. #endif
  586.     purgeable) {
  587.     {
  588.         "ARes";        
  589.         "ProgBarOpen";
  590.         "ProgBarClose";
  591.         "ProgBarRes";
  592.         "GFinder";
  593.         "GInit";
  594.         "GOpen2";
  595.         "GNonRes2";
  596.         "GNonRes3";
  597.         "GClipboard";        
  598.         "GReadFile";
  599.         "GTerminate";        
  600.         "GWriteFile";
  601.         "GSelCommand";
  602.         
  603.     }
  604. };
  605. #endif qPowerPC
  606.  
  607. // Additional Resident Segments
  608. // ----------------------------
  609. /*
  610. resource 'res!' (kTwistDownAppRes,
  611. #if qNames
  612.     kApplicationName,
  613. #endif
  614.     purgeable) {
  615.     {    
  616.         "ARes";        
  617.         "ProgBarOpen";
  618.         "ProgBarClose";
  619.         "ProgBarRes";
  620.         "GFinder";
  621.         "GInit";
  622.         "GOpen2";
  623.         "GNonRes2";
  624.         "GNonRes3";
  625.         "GClipboard";        
  626.         "GReadFile";
  627.         "GTerminate";        
  628.         "GWriteFile";        
  629.         "GSelCommand";
  630.         
  631.     };
  632. };
  633.  
  634.  
  635. */
  636. // Code fragment resource for PowerPC native apps
  637. // ----------------------------------------------
  638. #if qPowerPC
  639. #include "CodeFragmentTypes.r"
  640.  
  641. resource 'cfrg' (0, "Configuration Info") {
  642.     {
  643.         kPowerPC,
  644.         kFullLib,
  645.         kNoVersionNum,
  646.         kNoVersionNum,
  647.         0,
  648.         0,
  649.         kIsApp,
  650.         kOnDiskFlat,
  651.         kZeroOffset,
  652.         kWholeFork,
  653.         "Twist Down Lists"
  654.     }
  655. };
  656. #endif
  657.  
  658. //--------------------------------------------------------------------------------------------------
  659. // Icons, Bundles and FRefs… 
  660. //--------------------------------------------------------------------------------------------------
  661.  
  662. type kSignature as 'STR ';
  663. resource kSignature (0,
  664. #if qNames
  665. "Signature",
  666. #endif
  667.     purgeable) {
  668.     TDL_LONG_VERSION
  669. };
  670.  
  671. resource 'FREF' (kApplicationID,
  672. #if qNames
  673. "Twist Down Lists Application",
  674. #endif
  675.     purgeable) {
  676.     'APPL',
  677.     0,
  678.     ""
  679. };
  680.  
  681. resource 'FREF' (kDocumentID,
  682. #if qNames
  683. "Twist Down Lists Document",
  684. #endif
  685.     purgeable) {
  686.     kFileType,
  687.     1,
  688.     ""
  689. };
  690.  
  691. resource 'BNDL' (kBundleID,
  692. #if qNames
  693. "Twist Down Lists",
  694. #endif
  695.     purgeable) {
  696.     kSignature,
  697.     0,
  698.     { /* array TypeArray: 2 elements */
  699.         /* [1] */
  700.         'ICN#',
  701.         { /* array IDArray: 2 elements */
  702.             0, kApplicationID
  703. //            1, kDocumentID
  704.         },
  705.         /* [2] */
  706.         'FREF',
  707.         { /* array IDArray: 2 elements */
  708.             0, kApplicationID,
  709.             1, kDocumentID
  710.         }
  711.     }
  712. };
  713.  
  714. //--------------------------------------------------------------------------------------------------
  715. //  Version resources
  716. //--------------------------------------------------------------------------------------------------
  717.  
  718. // The revision of this particular file
  719.  
  720. resource 'vers' (1,
  721. #if qNames
  722. "File Version",
  723. #endif
  724.     purgeable) {
  725.     TDL_VERS_CODE,
  726.     verUs,
  727.     TDL_SHORT_VERSION,
  728.     TDL_LONG_VERSION
  729. };
  730.  
  731. #if !qPowerPC
  732. resource 'vers' (2,
  733. #if qNames
  734.     "Package Version",
  735. #endif
  736.     purgeable) {
  737.     TDL_VERS_CODE,
  738.     verUs,
  739.     TDL_SHORT_VERSION,
  740.     TDL_LONG_VERSION
  741. };
  742. #endif
  743.  
  744. #ifndef __TDLAETERMINOLOGYEXTENSION__
  745. #include "TDL_AETerminologyExtension.r"
  746. #endif
  747.  
  748. #ifndef __TWISTDOWNLISTICONS__
  749. #include "TwistDownListIcons.r"
  750. #endif
  751.  
  752. #ifndef __TDLABOUTBOX__
  753. #include "TDLAboutBox.r"
  754. #endif